#include "suanfa.h"

int main(){
    int arry[ARRY_MAX];
    memset(&arry,0,sizeof(arry));
    int i = 0;
    int size = 0;
    while (1)
    {
        if(i == ARRY_MAX){
            break;
        }
        int data = 0;
        printf("input %d data:\n",i);
        scanf("%d",&data);
        if(data == -1){
            break;
        }
        arry[i++] = data;
    }
    size = i;
    // LOG("bubble_sort asec\n");
    // bubble_sort(arry,size,SORT_ASEC);
    // show_arry(arry,size);
    // LOG("bubble_sort desc\n");
    // bubble_sort(arry,size,SORT_DESC);
    // show_arry(arry,size);
    // LOG("select_sort asec\n");
    // select_sort(arry,size,SORT_ASEC);
    // show_arry(arry,size);
    // LOG("select_sort desc\n");
    // select_sort(arry,size,SORT_DESC);
    // show_arry(arry,size);
    LOG("insert_sort asec\n");
    insert_sort(arry,size,SORT_ASEC);
    show_arry(arry,size);
    LOG("insert_sort desc\n");
    insert_sort(arry,size,SORT_DESC);
    show_arry(arry,size);
    return 0;
}